package com.llb666.shop.items.infrastructure.mapper;

import com.llb666.common.core.tk.mapper.MyMapper;
import com.llb666.shop.items.infrastructure.po.ItemsSpecPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface ItemsSpecMapper extends MyMapper<ItemsSpecPo> {

    /**
     * 减库存.
     *
     * @param itemSpecId 规格id
     * @param buyCounts  购买数量
     * @return int
     */
    int decreaseItemSpecStock(@Param("specId")String itemSpecId, @Param("pendingCounts")int buyCounts);

}